import request from "../utils/request";


export const getAllBuildingService = () => {
    return request.get("/building/getAllBuilding")
}

export const addBuildingService = (form) => {
    const params = new URLSearchParams()
    for (let key in form) {
        params.append(key, form[key])
    }
    return request.post("/building/addBuilding", params)
}

export const deleteBuildingService = (building) => {
    const params = new URLSearchParams()
    params.append('building', building)
    return request.put("/building/deleteBuilding", params)
}

export const updateBuildingService = (form) => {
    const params = new URLSearchParams()
    for (let key in form) {
        params.append(key, form[key])
    }
    return request.post("/building/updateBuilding", params)
}